package com.tttshaoqi.server.mapper;

import com.tttshaoqi.pojo.dto.LoginDTO;
import com.tttshaoqi.pojo.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmployeeMapper {

    List<Employee> list(String name);

    Employee getByUAP(LoginDTO loginDTO);

    void updateById(Employee employee);

    @Select("select * from employee where username = #{username}")
    Employee getByUsername(String username);

    void add(Employee employee);

    @Select("select * from employee where id = #{id}")
    Employee getById(Long id);
}
